feat: two-phase status polling via lightweight /status endpoint#446
Merged
feat: two-phase status polling via lightweight /status endpoint#446
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d162501efc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e5ef516 to
d191e12
Compare
d191e12 to
a17c9b8
Compare
Use the lightweight status endpoint from RemoteRolloutProcessor via the shared aiohttp session and avoid the logs backfill after terminal status is observed. Made-with: Cursor
Continue polling when the lightweight status endpoint returns RUNNING so the remote rollout processor only exits the poll loop for terminal statuses. Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8e0e0ef. Configure here.
Read rollout status extras from the top-level status response so RemoteRolloutProcessor preserves metadata that previously came from log entries. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
get_status()toFireworksTracingAdapterthat calls the new/statusendpoint on the tracing gateway for fast rollout status lookups.RemoteRolloutProcessorwith a two-phase approach: poll/statusfor the status code (lightweight point-read), then make a singlesearch_logscall to backfill message/details/extras.This reduces the hot-path read load on the Logs table from ~1000 RPS to a single read per rollout completion. Depends on the tracing gateway PR that adds the
/statusendpoint andStatusSpanner table ([mono PR](https://github.com/fw-ai/fireworks/pull/$(cd /Users/sandeepsingh/src/fireworks/mono && gh pr view --json number -q .number 2>/dev/null || echo "TBD"))).Test plan
get_status()returns status when available,Nonewhen notRemoteRolloutProcessorpolls/statusfirst, then fetches full logs onceMade with Cursor
Note
Medium Risk
Changes remote rollout completion polling logic and introduces a new tracing gateway call path, which could affect rollout completion detection and timeout behavior if the
/statusresponse shape/availability differs across deployments.Overview
Adds
FireworksTracingAdapter.get_status()to query a lightweight tracing gateway/status(with/v1/statusfallback) for rollout status codes.Updates
RemoteRolloutProcessorto use a two-phase polling flow: repeatedly pollget_status()until the rollout leavesRUNNING, then perform a singleasync_search_logs()call to backfill statusmessage/detailsand propagateextrasintoexecution_metadata.extra, reducing repeated log-table reads during polling.Reviewed by Cursor Bugbot for commit a17c9b8. Bugbot is set up for automated code reviews on this repo. Configure here.